$OpenBSD: patch-configure,v 1.8 2017/02/28 12:47:56 benoit Exp $
--- configure.orig	Thu Aug 11 09:48:55 2016
+++ configure	Sat Oct  8 19:35:00 2016
@@ -423,106 +423,6 @@ fi
   fi
 #fi
 
-echo "Checking for SVN (libsvn_client-1 libapr-1.so libaprutil-1.so) ..."
-for i in $LIBDIRS ; do
-    if [ "X" = "X$SVN_PATH" ]; then
-        if [ -f "$i/libsvn_client-1.so" ]; then
-            SVN_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$APR_PATH" ]; then   
-        if [ -f "$i/libapr-1.so" -a -f "$i/libaprutil-1.so" ]; then
-	    APR_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$SVN_PATH" ]; then
-        if [ -f "$i/libsvn_client-1.dll.a" ]; then
-            SVN_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$APR_PATH" ]; then   
-        if [ -f "$i/libapr-1.dll.a" -a -f "$i/libaprutil-1.dll.a" ]; then
-	    APR_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$SVN_PATH" ]; then
-        if [ -f "$i/libsvn_client-1.dylib" ]; then
-            SVN_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$APR_PATH" ]; then   
-        if [ -f "$i/libapr-1.dylib" -a -f "$i/libaprutil-1.dylib" ]; then
-	    APR_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$SVN_PATH" ]; then
-        if [ -f "$i/libsvn_client-1.a" ]; then
-            SVN_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$APR_PATH" ]; then   
-        if [ -f "$i/libapr-1.a" -a -f "$i/libaprutil-1.a" ]; then
-	    APR_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$SVN_PATH" ]; then
-        if [ -f "$i/libsvn_client-1.0.dylib" ]; then
-            SVN_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$APR_PATH" ]; then   
-        if [ -f "$i/libapr-1.0.dylib" -a -f "$i/libaprutil-1.0.dylib" ]; then
-	    APR_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$SVN_PATH" ]; then
-        TMP_LIB1=`/bin/ls $i/libsvn_client*.so* 2> /dev/null | grep libsvn_client.`
-        if [ -n "$TMP_LIB1" ]; then
-          SVN_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$APR_PATH" ]; then   
-        TMP_LIB2=`/bin/ls $i/libapr-1*.so* 2> /dev/null | grep libsvn_client.`
-        TMP_LIB3=`/bin/ls $i/libaprutil-1*.so* 2> /dev/null | grep libsvn_client.`
-        if [ -n "$TMP_LIB2" -a -n "$TMP_LIB3" ]; then
-	  APR_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$SVN_PATH" ]; then
-        TMP_LIB1=`/bin/ls $i/libsvn_client*.dll* 2> /dev/null | grep libsvn_client.`
-        if [ -n "$TMP_LIB1" ]; then
-          SVN_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$APR_PATH" ]; then   
-        TMP_LIB2=`/bin/ls $i/libapr-1*.dll* 2> /dev/null | grep libsvn_client.`
-        TMP_LIB3=`/bin/ls $i/libaprutil-1*.dll* 2> /dev/null | grep libsvn_client.`
-        if [ -n "$TMP_LIB2" -a -n "$TMP_LIB3" ]; then
-	  APR_PATH="$i"
-        fi
-    fi
-done
-for i in $INCDIRS ; do
-    if [ "X" = "X$SVN_IPATH" ]; then
-        if [ -d "$i/subversion-1" ]; then
-            SVN_IPATH="$i/subversion-1"
-        fi
-        if [ -d "$i/svn" ]; then
-            SVN_IPATH="$i/svn"
-        fi
-    fi  
-    if [ "X" = "X$APR_IPATH" ]; then
-        if [ -d "$i/apr-1.0" ]; then
-            APR_IPATH="$i/apr-1.0"
-        fi
-        if [ -d "$i/apr-1" ]; then
-            APR_IPATH="$i/apr-1"
-        fi
-        if [ -d "$i/apr" ]; then
-            APR_IPATH="$i/apr"
-        fi
-    fi  
-done
 if [ "X" != "X$DEBUG" ]; then
    echo DEBUG: SVN_PATH=$SVN_PATH/libsvn_client-1
    echo DEBUG: APR_PATH=$APR_PATH/libapr
@@ -549,26 +449,6 @@ if [ "X" = "X$SVN_PATH" -o "X" = "X$APR_PATH" ]; then
     echo "                                                               ... NOT found, module svn disabled"
 fi
 
-echo "Checking for firebird (libfbclient.so) ..."
-for i in $LIBDIRS ; do
-    if [ "X" = "X$FIREBIRD_PATH" ]; then
-        if [ -f "$i/libfbclient.so" -o -f "$i/libfbclient.dylib" -o -f "$i/libfbclient.a" ]; then
-            FIREBIRD_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$FIREBIRD_PATH" ]; then
-        TMP_LIB=`/bin/ls $i/libfbclient.so.* 2> /dev/null | grep libfbclient.`
-        if [ -n "$TMP_LIB" ]; then
-          FIREBIRD_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$FIREBIRD_PATH" ]; then
-        TMP_LIB=`/bin/ls $i/libfbclient.dll* 2> /dev/null | grep libfbclient.`
-        if [ -n "$TMP_LIB" ]; then
-          FIREBIRD_PATH="$i"
-        fi
-    fi
-done
 for i in $INCDIRS ; do
     if [ "X" != "X$FIREBIRD_PATH" ]; then
         if [ -f "$i/ibase.h" ]; then
@@ -638,26 +518,6 @@ if [ -f "/usr/include/math.h" ]; then
 else
       echo "                                       ... math.h not found, module Mysql disabled"
 fi
-echo "Checking for AFP (libafpclient.so) ..."
-for i in $LIBDIRS ; do
-    if [ "X" = "X$AFP_PATH" ]; then
-        if [ -f "$i/libafpclient.so" -o -f "$i/libafpclient.so" -o -f "$i/libafpclient.a"   ]; then
-            AFP_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$AFP_PATH" ]; then
-        TMP_LIB=`/bin/ls $i/libafpclient.so.* 2> /dev/null | grep libafpclient.`
-        if [ -n "$TMP_LIB" ]; then
-          AFP_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$AFP_PATH" ]; then
-        TMP_LIB=`/bin/ls $i/libafpclient.dll* 2> /dev/null | grep libafpclient.`
-        if [ -n "$TMP_LIB" ]; then
-          AFP_PATH="$i"
-        fi
-    fi
-done
 for i in $INCDIRS ; do
     if [ "X" != "X$AFP_PATH" ]; then
         if [ -f "$i/afpfs-ng/afp.h" ]; then
@@ -678,26 +538,6 @@ if [ "X" = "X$AFP_PATH" -o "X" = "X$AFP_IPATH" ]; then
     AFP_IPATH=""
 fi
 
-echo "Checking for NCP (libncp.so / nwcalls.h) ..."
-for i in $LIBDIRS ; do
-    if [ "X" = "X$NCP_PATH" ]; then
-        if [ -f "$i/libncp.so" -o -f "$i/libncp.dylib" -o -f "$i/libncp.a"  ]; then
-            NCP_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$NCP_PATH" ]; then
-        TMP_LIB=`/bin/ls $i/libncp.so.* 2> /dev/null | grep ncp.`
-        if [ -n "$TMP_LIB" ]; then
-            NCP_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$NCP_PATH" ]; then
-        TMP_LIB=`/bin/ls $i/libncp.dll* 2> /dev/null | grep ncp.`
-        if [ -n "$TMP_LIB" ]; then
-            NCP_PATH="$i"
-        fi
-    fi
-done
 for i in $INCDIRS ; do
     if [ "X" != "X$NCP_PATH" ]; then
         if [ -f "$i/ncp/nwcalls.h" ]; then
@@ -718,27 +558,6 @@ if [ "X" = "X$NCP_PATH" -o "X" = "X$NCP_IPATH" ]; then
     NCP_IPATH=""
 fi
 
-echo "Checking for SAP/R3 (librfc/saprfc.h) ..."
-for i in $LIBDIRS  ; do
-    if [ "X" = "X$SAPR3_PATH" ]; then
-        if [ -f "$i/librfc.a" -o -f "$i/librfc.dylib" -o "$i/librfc32.dll" ]; then
-            SAPR3_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$SAPR3_PATH" ]; then
-        TMP_LIB=`/bin/ls $i/librfc.* $i/librfc32.* 2> /dev/null | grep librfc`
-        if [ -n "$TMP_LIB" ]; then
-          SAPR3_PATH="$i"
-        fi
-    fi
-done
-for i in $INCDIRS ; do
-    if [ "X" = "X$SAPR3_IPATH" ]; then
-        if [ -f "$i/saprfc.h" ]; then
-            SAPR3_IPATH="$i"
-        fi
-    fi
-done
 if [ "X" != "X$DEBUG" ]; then
    echo DEBUG: SAPR3_PATH=$SAPR3_PATH/librfc
    echo DEBUG: SAPR3_IPATH=$SAPR3_IPATH/saprfc.h
@@ -822,47 +641,6 @@ if [ "X" != "X$DEBUG" ]; then
    echo DEBUG: ORACLE_INC=$INCDIRS
 fi
 
-for i in $LIBDIRS ; do
-    if [ "X" = "X$ORACLE_PATH" ]; then
-        if [ -f "$i/libocci.so" -a -f "$i/libclntsh.so" ]; then
-            ORACLE_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$ORACLE_PATH" ]; then
-        if [ -f "$i/libocci.dylib" -a -f "$i/libclntsh.dylib" ]; then
-            ORACLE_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$ORACLE_PATH" ]; then
-        if [ -f "$i/libocci.a" -a -f "$i/libclntsh.a" ]; then
-            ORACLE_PATH="$i"
-        fi
-    fi
-    if [ "X" = "X$ORACLE_PATH" ]; then
-        TMP_LIB=`/bin/ls $i/libocci.so.* 2> /dev/null | grep occi.`
-        if [ -n "$TMP_LIB" ]; then
-            ORACLE_PATH="$i"
-        fi
-        if [ "X" != "X$ORACLE_PATH" ]; then
-          TMP_LIB=`/bin/ls $i/libclntsh.so.* 2> /dev/null | grep clntsh.`
-          if [ -z "$TMP_LIB" ]; then
-            ORACLE_PATH=""
-          fi
-        fi
-    fi
-    if [ "X" = "X$ORACLE_PATH" ]; then
-        TMP_LIB=`/bin/ls $i/libocci.dll* 2> /dev/null | grep occi.`
-        if [ -n "$TMP_LIB" ]; then
-            ORACLE_PATH="$i"
-        fi
-        if [ "X" != "X$ORACLE_PATH" ]; then
-          TMP_LIB=`/bin/ls $i/libclntsh.dll* 2> /dev/null | grep clntsh.`
-          if [ -z "$TMP_LIB" ]; then
-            ORACLE_PATH=""
-          fi
-        fi
-    fi
-done
 if [ "X" != "X$DEBUG" ]; then
    echo DEBUG: ORACLE_PATH=$ORACLE_PATH/libocci
 fi
@@ -894,13 +672,6 @@ if [ "X" != "X$DEBUG" ]; then
    echo DEBUG: ORACLE_PATH=$ORACLE_PATH/libaio
 fi
 
-for i in $INCDIRS ; do
-    if [ "X" != "X$ORACLE_PATH" ]; then
-        if [ -f "$i/oci.h" ]; then
-            ORACLE_IPATH="$i"
-        fi
-    fi
-done
 if [ "X" != "X$DEBUG" ]; then
    echo DEBUG: ORACLE_IPATH=$ORACLE_IPATH/oci.h
 fi
@@ -997,7 +768,7 @@ test -x $TMPC && GCCSEC="yes"
 grep -q fPI $TMPC.c.err || GCCSECOPT="-pie -fPIE $GCCSECOPT"
 rm -f "$TMPC"
 gcc $GCCSECOPT -Wl,-z,now -Wl,-z,relro -o $TMPC $TMPC.c > /dev/null 2> $TMPC.c.err
-test -x $TMPC && { LDSEC="yes" ; GCCSECOPT="$GCCSECOPT -Wl,-z,now -Wl,-z,relro" ; }
+test -x $TMPC && { LDSEC="yes" ; GCCSECOPT="$GCCSECOPT" ; }
 rm -f $TMPC $TMPC.c $TMPC.c.err
 echo "                                                  Compiling... $GCCSEC"
 echo "                                                  Linking... $LDSEC"
